﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Addins.Outlook
{
    /// <summary>
    /// Interaktionslogik für LinqQueryControl.xaml
    /// </summary>
    public partial class LinqQueryControl : UserControl
    {
        private LinqQueryViewModel _lqvm;

        public LinqQueryControl()
        {
            InitializeComponent();

            _lqvm = new LinqQueryViewModel(Dispatcher);
            DataContext = _lqvm;
        }

        private void _UserControlUnloaded(object sender, RoutedEventArgs e)
        {
            if (_lqvm != null)
            {
                _lqvm.Dispose();
            }
            _lqvm = null;
        }
    }
}
